

export const getValue = obj =>
Object.keys(obj)
    .map(key => obj[key])
.join(',');

export function initTotalList(columns) {
  const totalList = [];
  columns.forEach(column => {
    if (column.needTotal) {
      totalList.push({ ...column, total: 0 });
    }
  });
   return totalList;
}